]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
workspace: Only show the close buttons for windows that can close
authorJasper St. Pierre <jstpierre@mecheye.net>
Fri, 26 Apr 2013 15:32:40 +0000 (11:32 -0400)
committerJasper St. Pierre <jstpierre@mecheye.net>
Thu, 9 May 2013 19:35:25 +0000 (15:35 -0400)
https://bugzilla.gnome.org/show_bug.cgi?id=699269

js/ui/workspace.js

index 63952083e29fef93be24306c5748bc3e0eae85d6..bf5d277cf6f9882e6e62711bc539b093d5d80cae 100644 (file)
@@ -453,6 +453,10 @@ const WindowOverlay = new Lang.Class({
         metaWindow.delete(global.get_current_time());
     },
 
+    _windowCanClose: function() {
+        return this._windowClone.metaWindow.can_close();
+    },
+
     _onWindowAdded: function(workspace, win) {
         let metaWindow = this._windowClone.metaWindow;
 
@@ -488,12 +492,14 @@ const WindowOverlay = new Lang.Class({
     _animateVisible: function() {
         this._parentActor.raise_top();
 
-        this.closeButton.show();
-        this.closeButton.opacity = 0;
-        Tweener.addTween(this.closeButton,
-                         { opacity: 255,
-                           time: CLOSE_BUTTON_FADE_TIME,
-                           transition: 'easeOutQuad' });
+        if (this._windowCanClose()) {
+            this.closeButton.show();
+            this.closeButton.opacity = 0;
+            Tweener.addTween(this.closeButton,
+                             { opacity: 255,
+                               time: CLOSE_BUTTON_FADE_TIME,
+                               transition: 'easeOutQuad' });
+        }
 
         this.border.show();
         this.border.opacity = 0;